import java.util.Scanner;

public class Two {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int a=1,b=1,c=0;
        for (int i = 2; i <=n; i++) {
            c=a+b;
            a=b;
            b=c;
        }
        if (n==0||n==1){
            System.out.println(n);
        }else {
            System.out.println(c);
        }
    }
}
